<h1>Notícias</h1>


<% for post in @posts %>
  <div class='inner-body'>

      <%= show_post post %>

      <% if authorized? %>
        <%= link_to 'Editar', edit_post_path(post) , :class => 'button' %>
        <%= link_to 'Apagar', post, :confirm => 'Está certo disso?', :method => :delete, :class => 'button' %>
      <% end %>
  </div>
<% end %>

<div id="page">
<%= will_paginate @posts, options = pagination_options  %>
</div>

<br />

<%= link_to 'Nova Postagem', new_post_path, :class => "button" if authorized? %>

